﻿<%@ Page Language="C#" MasterPageFile="~/Master/MasterPage.master" AutoEventWireup="True"
	CodeBehind="SortSourceStatistics.aspx.cs" Inherits="TotalDrugs_SortSourceStatistics"
	Title="采购类型统计" %>

<%@ Register Src="~/Common/QueryControl.ascx" TagName="QueryControl" TagPrefix="uc1" %>
<%@ Register Src="../Common/ChartControl.ascx" TagName="ChartControl" TagPrefix="uc2" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
	<div id="tabnav">
		<ul>
			<li><a href="../Secondphase/NewReport/SortSourcePSL_Total.aspx">采购类型统计</a></li>
			<li class="active"><a href="'../../TotalDrugs/SortSourceStatistics.aspx">采购类型实时统计</a></li>
		</ul>
	</div>
	<div id="tabcontent2">
		<uc1:QueryControl ID="QueryControl1" runat="server" />
	</div>
	<div>
		<asp:GridView ID="gvwInfo" runat="server" AutoGenerateColumns="False" CssClass="mainlist"
			EmptyDataText="暂无符合条件的数据！" OnRowCommand="gvwInfo_RowCommand" DataKeyNames="SortSource">
			<Columns>
				<asp:TemplateField HeaderText="序号">
					<ItemTemplate>
						<%# Container.DataItemIndex+1+AspNetPager1.PageSize*(AspNetPager1.CurrentPageIndex-1) %>
					</ItemTemplate>
					<HeaderStyle Width="30px" />
				</asp:TemplateField>
				<asp:TemplateField HeaderText="采购类型">
					<ItemTemplate>
						<%# HZ.Supervise.Web.Function.FormatDrugSource( Eval("SortSource")) %>
					</ItemTemplate>
				</asp:TemplateField>
				<asp:BoundField HeaderText="品规" DataField="DrugCount" />
				<%--              <asp:BoundField HeaderText="采购总数量" DataField="PurchaseCountTotal" />--%>
				<asp:BoundField HeaderText="采购金额" DataField="PurchaseAmountTotal" DataFormatString="{0:N2}" />
				<%--       <asp:BoundField HeaderText="配送总数量" DataField="DistributeCountTotal" />--%>
				<asp:BoundField DataField="DistributeAmountTotal" HeaderText="配送金额" DataFormatString="{0:N2}" />
				<asp:BoundField DataField="DistributeRate" HeaderText="配送率" DataFormatString="{0:P2}"
					NullDisplayText="NA" />
				<%-- <asp:BoundField HeaderText="入库总量" DataField="WareHouseCountTotal" />--%>
				<asp:BoundField DataField="WareHouseAmountTotal" HeaderText="入库金额" DataFormatString="{0:N2}" />
				<asp:BoundField HeaderText="入库率" DataField="WareHouseRate" DataFormatString="{0:P2}"
					NullDisplayText="NA" />
				<%--<asp:TemplateField HeaderText="查看">
                    <ItemTemplate>
                        <asp:LinkButton ID="lbnCom_PS" runat="server" CommandName="DirectByCom" CommandArgument='<%# Eval("SortSource")%>'
                            ToolTip="按不同的配送企业来查看该生产企业的药品交易情况">配送企业</asp:LinkButton>
                        <asp:LinkButton ID="lbnHos" runat="server" CommandName="DirectByHos" CommandArgument='<%# Eval("SortSource") %>'
                            ToolTip="按不同的医院来查看该生产企业的药品交易情况">相关医院</asp:LinkButton>
                        <asp:LinkButton ID="lbnDrug" runat="server" CommandName="DierectByDrug" CommandArgument='<%# Eval("SortSource") %>'
                            ToolTip="按不同的药品来查看该生产企业的药品交易情况">相关药品</asp:LinkButton>
                        <asp:LinkButton ID="lblDetail" runat="server" CommandName="DierectByDetail" CommandArgument='<%# Eval("SortSource") %>'
                            ToolTip="查看该类别的药品的详细信息">采购明细</asp:LinkButton>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="其它">
                    <ItemTemplate>
                        <asp:DropDownList ID="ddlOther" runat="server" AutoPostBack="True" OnSelectedIndexChanged="ddlOther_SelectedIndexChanged"
                            DataSourceID="XmlDataSource1" DataTextField="Name" DataValueField="Id">
                        </asp:DropDownList>
                    </ItemTemplate>
                </asp:TemplateField>--%>
			</Columns>
		</asp:GridView>
	</div>
	<div class="page">
		<span style="width: 30%; float: left; text-align: left">
			<hz:HzButton ID="btnExcel" runat="server" CssClass="btn" Text="导出数据" OnClick="btnExcel_Click" /></span><span
				style="width: 70%; float: right; text-align: right">
				<webdiyer:AspNetPager ID="AspNetPager1" runat="server" OnPageChanged="AspNetPager1_PageChanged"
					AlwaysShow="true">
				</webdiyer:AspNetPager>
			</span>
	</div>
	<div id="divshow" runat="server" class="listip">
		<ul>
			<div style="display: none">
				<li>统计：<span>【基本药物 采购金额/总采购金额】 =
					<asp:Literal ID="ltlPercent" runat="server"></asp:Literal></span></li>
				<li><span>【非基本药物 采购金额/总采购金额】 =
					<asp:Literal ID="ltrPercent1" runat="server"></asp:Literal></span></li>
				<li><span>【基本药物 采购金额/非基本药物 采购金额】 =
					<asp:Literal ID="ltrPercent2" runat="server"></asp:Literal></span></li>
				<asp:LinkButton ID="lbtnSee" runat="server" OnClick="lbtnSee_Click" Font-Size="Small"
					Visible="false">显示图表</asp:LinkButton>
				<uc2:ChartControl ID="ChartControl1" runat="server" Visible="False" />
			</div>
			<li>说明:<span>（1）实时查询数据量比较大，建议静态查询；</span></li>
			<li><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;（2）由于数据库比较大，请先选择相应条件，点击“查询”按钮。</span>
			</li>
		</ul>
	</div>
</asp:Content>
